﻿using Camc.Quality.QualityAnalysis.RFormBase;
using Camc.Quality.QualityAnalysis.RFormClass;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Camc.Quality.ProcessRoute
{
    public class RConvertFormBase : RTableBase
    {
        public RConvertFormBase(
            Guid id,string formName, int serialNum, Guid rWorkStepEntityId, Guid rProcessesEntityId, int sort, string deptment, string recordRemark, 
            //RInspectionSignatureEntity inspectionSignature, RRecordRequirementsEntity recordRequirements, RMultiMediaEntity multiMedia, RMeasuredResultEntity measuredResult, REnvironmentEntity environment,
            string parentProductNum, string parentProductNum_DisplayName, string parentProductName, string parentProductName_DisplayName, string fisrtDrawingNum, string fisrtDrawingNum_DisplayName, string firstDrawingName, string firstDrawingName_DisplayName, string secondDrawingNum, string secondDrawingNum_DisplayName, string secondDrawingName, string secondDrawingName_DisplayName, string productNum, string productNum_DisplayName, string model, string model_DisplayName, string recordElement, string recordElement_DisplayName, string recordItem, string recordItem_DisplayName, string toolUsed, string toolUsed_DisplayName, string abnormalRecord, string abnormalRecord_DisplayName, string certificate, string certificate_DisplayName, string secondToolUsed, string secondToolUsed_DisplayName, string thirdToolUsed, string thirdToolUsed_DisplayName, string paramCode, string paramCode_DisplayName
        )
        {
            Id = id;
            FormName = formName;
            SerialNum = serialNum;
            RWorkStepEntityId = rWorkStepEntityId;
            RProcessesEntityId = rProcessesEntityId;
            Sort = sort;
            Deptment = deptment;
            RecordRemark = recordRemark;
            //InspectionSignature = inspectionSignature;
            //RecordRequirements = recordRequirements;
            //MultiMedia = multiMedia;
            //MeasuredResult = measuredResult;
            //Environment = environment;
            ParentProductNum = parentProductNum;
            ParentProductNum_DisplayName = parentProductNum_DisplayName;
            ParentProductName = parentProductName;
            ParentProductName_DisplayName = parentProductName_DisplayName;
            FisrtDrawingNum = fisrtDrawingNum;
            FisrtDrawingNum_DisplayName = fisrtDrawingNum_DisplayName;
            FirstDrawingName = firstDrawingName;
            FirstDrawingName_DisplayName = firstDrawingName_DisplayName;
            SecondDrawingNum = secondDrawingNum;
            SecondDrawingNum_DisplayName = secondDrawingNum_DisplayName;
            SecondDrawingName = secondDrawingName;
            SecondDrawingName_DisplayName = secondDrawingName_DisplayName;
            ProductNum = productNum;
            ProductNum_DisplayName = productNum_DisplayName;
            Model = model;
            Model_DisplayName = model_DisplayName;
            RecordElement = recordElement;
            RecordElement_DisplayName = recordElement_DisplayName;
            RecordItem = recordItem;
            RecordItem_DisplayName = recordItem_DisplayName;
            ToolUsed = toolUsed;
            ToolUsed_DisplayName = toolUsed_DisplayName;
            AbnormalRecord = abnormalRecord;
            AbnormalRecord_DisplayName = abnormalRecord_DisplayName;
            Certificate = certificate;
            Certificate_DisplayName = certificate_DisplayName;
            SecondToolUsed = secondToolUsed;
            SecondToolUsed_DisplayName = secondToolUsed_DisplayName;
            ThirdToolUsed = thirdToolUsed;
            ThirdToolUsed_DisplayName = thirdToolUsed_DisplayName;
            ParamCode = paramCode;
            ParamCode_DisplayName = paramCode_DisplayName;
        }

        public RInspectionSignatureEntity SetInspectionSignature(string inspectionSignatureName, string firstOperator, string firstOperator_DisplayName, DateTime? firstOperatorData, string firstOperatorData_DisplayName, string secondOperator, string secondOperator_DisplayName, DateTime? secondOperatorData, string secondOperatorData_DisplayName, string thirdOperator, string thirdOperator_DisplayName, DateTime? thirdOperatorData, string thirdOperatorData_DisplayName, string fourthOperator, string fourthOperator_DisplayName, DateTime? fourthOperatorData, string fourthOperatorData_DisplayName, string fifthOperator, string fifthOperator_DisplayName, DateTime? fifthOperatorData, string fifthOperatorData_DisplayName)
        {
            RInspectionSignatureEntity entity = new RInspectionSignatureEntity(inspectionSignatureName, firstOperator, firstOperator_DisplayName, firstOperatorData, firstOperatorData_DisplayName, secondOperator, secondOperator_DisplayName, secondOperatorData, secondOperatorData_DisplayName, thirdOperator, thirdOperator_DisplayName, thirdOperatorData, thirdOperatorData_DisplayName, fourthOperator, fourthOperator_DisplayName, fourthOperatorData, fourthOperatorData_DisplayName, fifthOperator, fifthOperator_DisplayName, fifthOperatorData, fifthOperatorData_DisplayName);
            return entity;
        }
        public RRecordRequirementsEntity SetRecordRequirements(string recordLocation, string recordLocation_DisplayName, string recordStatus, string recordStatus_DisplayName, string recordRequire, string recordRequire_DisplayName, string recordMainopoint, string recordMainopoint_DisplayName, string designerDemand, string designerDemand_DisplayName, string processorDemand, string processorDemand_DisplayName, string remarks, string remarks_DisplayName)
        {
            RRecordRequirementsEntity entity = new RRecordRequirementsEntity(recordLocation, recordLocation_DisplayName, recordStatus, recordStatus_DisplayName, recordRequire, recordRequire_DisplayName, recordMainopoint, recordMainopoint_DisplayName, designerDemand, designerDemand_DisplayName, processorDemand, processorDemand_DisplayName, remarks, remarks_DisplayName);
            return entity;
        }
        public RMultiMediaEntity SetMultiMedia(string photoNo, string photoNo_DisplayName, string secondPhotoNo = null, string secondPhotoNo_DisplayName = null, string thirdPhotoNo = null, string thirdPhotoNo_DisplayName = null, string fourthPhotoNo = null, string fourthPhotoNo_DisplayName = null)
        {
            RMultiMediaEntity entity = new RMultiMediaEntity(photoNo, photoNo_DisplayName, secondPhotoNo, secondPhotoNo_DisplayName, thirdPhotoNo, thirdPhotoNo_DisplayName, fourthPhotoNo, fourthPhotoNo_DisplayName);
            return entity;
        }
        public RMeasuredResultEntity SetMeasuredResult(string firstMeasuredValues, string firstMeasuredValues_DisplayName, string secondMeasuredValues, string secondMeasuredValues_DisplayName, string thirdMeasuredValues, string thirdMeasuredValues_DisplayName, string fourthMeasuredValues, string fourthMeasuredValues_DisplayName, string firstConfirmResult, string firstConfirmResult_DisplayName, string secondConfirmResult, string secondConfirmResult_DisplayName, string thirdConfirmResult, string thirdConfirmResult_DisplayName, string measuredActual, string measuredActual_DisplayName)
        {
            RMeasuredResultEntity entity = new RMeasuredResultEntity(firstMeasuredValues, firstMeasuredValues_DisplayName, secondMeasuredValues, secondMeasuredValues_DisplayName, thirdMeasuredValues, thirdMeasuredValues_DisplayName, fourthMeasuredValues, fourthMeasuredValues_DisplayName, firstConfirmResult, firstConfirmResult_DisplayName, secondConfirmResult, secondConfirmResult_DisplayName, thirdConfirmResult, thirdConfirmResult_DisplayName, measuredActual, measuredActual_DisplayName);
            return entity;
        }
        public REnvironmentEntity SetEnvironment(string temperature, string temperature_DisplayName, string humidity, string humidity_DisplayName, string atmPressure, string atmPressure_DisplayName)
        {
            REnvironmentEntity entity = new REnvironmentEntity(temperature, temperature_DisplayName, humidity, humidity_DisplayName, atmPressure, atmPressure_DisplayName);
            return entity;
        }
    }
}
